#set(seoTitle="已经上传的报表")
#@layout()
#define js()

#end
#define content()

<script type="text/javascript">
$(document).ready(function(){
    
    var _toolbar = [
        {
            id:'btnRefresh',
            text:'刷新',
            iconCls:'icon-reload',
            handler:function(){
                refresh();
            }   
        }];
    
    $('#datagrid').datagrid({  
        title:'excel管理',
        url:'excelData',  
        toolbar:_toolbar,
        columns:[[  
            {field:'bank',title:'机构',width:150,align:'center',},
            {field:'year',title:'年',width:50,align:'center'},
            {field:'month',title:'月',width:50,align:'center'},
            {field:'action',title:'操作',width:150,align:'center',
                    formatter:function(value,row,index){
                        var a = "<a href='javascript:show("+row.id+")'>查询数据</a> ";
                        var b = "<a href='javascript:deleteData("+row.id+")'>删除数据</a> ";
                        return a+" "+b;
                    }
            }
        ]],
        rowStyler: function(index,row){
            return "height:50px;";
        },
        pagination:true,
        rownumbers:true,
        pageSize:10,
        singleSelect:true
    });  
    
    
});

function refresh(){
    $('#datagrid').datagrid('reload');
}


function search(){
    var organization = $("#organization").val();
    var year = $("#year").val();
    var month = $("#month").val();
    $('#datagrid').datagrid('load',{"organization":organization,"year": year,"month":month});
}


function show(id){
	window.open ('bankDataDetail?id='+id, 'newwindow', 'height='+(screen.height-60)+', width='+(screen.width-10)+', top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, status=no');
}
function deleteData(id){
	$.messager.confirm('删除','你确定要删除数据吗?',function(r){
        if (r){  
            $.getJSON('dataDel',{'id':id},function(result){
                if(result.code=="00"){
                    $.messager.alert('消息',result.message);
                    $('#datagrid').datagrid('reload');
                }else{
                    $.messager.alert('出错啦',result.message);
                }
            });
        }  
    });
	
	
}
</script>
<div id="p1" class="easyui-panel" title="查询" style="padding:10px;background:#fafafa;margin-bottom:10px;" iconCls="icon-sum" closable="false" collapsible="false" minimizable="false" maximizable="false">
        机构：<select id="organization">
                <option value="">全部</option>
                <option value="农发行">农发行</option>
                <option value="工行">工行</option>
                <option value="农行">农行</option>
                <option value="中行">中行</option>
                <option value="建行">建行</option>
                <option value="交行">交行</option>
                <option value="邮储">邮储</option>
                <option value="中信">中信</option>
                <option value="浦发">浦发</option>
                <option value="招商">招商</option>
                <option value="兴业">兴业</option>
                <option value="浙商">浙商</option>
                <option value="平安">平安</option>
                <option value="光大">光大</option>
                <option value="民生">民生</option>
                <option value="广发">广发</option>
                <option value="华夏">华夏</option>
                <option value="恒丰">恒丰</option>
                <option value="嘉兴银行">嘉兴银行</option>
                <option value="泰隆">泰隆</option>
                <option value="民泰">民泰</option>
                <option value="稠州">稠州</option>
                <option value="湖州银行">湖州银行</option>
                <option value="绍兴银行">绍兴银行</option>
                <option value="金华银行">金华银行</option>
                <option value="杭州银行">杭州银行</option>
                <option value="宁波银行">宁波银行</option>
                <option value="台州银行">台州银行</option>
                <option value="禾城农商">禾城农商</option>
                <option value="桐乡农商">桐乡农商</option>
                <option value="嘉善农商">嘉善农商</option>
                <option value="海宁农商">海宁农商</option>
                <option value="平湖农商">平湖农商</option>
                <option value="海盐农商">海盐农商</option>
                <option value="上海农商">上海农商</option>
                <option value="杭州联合">杭州联合</option>
                <option value="桐乡民泰">桐乡民泰</option>
                <option value="嘉善村镇">嘉善村镇</option>
                <option value="海宁德商">海宁德商</option>
                <option value="平湖工银">平湖工银</option>
                <option value="海盐湖商">海盐湖商</option>
                <option value="秀洲德商">秀洲德商</option>
           </select>
        年：<select id="year">
                 <option value=""></option>
                <option value="2017">2017</option>
                 <option value="2018">2018</option>
                  <option value="2019">2019</option>
                   <option value="2020">2020</option>
           </select> 
    月：
    <select id="month">
                <option value=""></option>
                <option value="1">1</option>
                 <option value="2">2</option>
                  <option value="3">3</option>
                   <option value="4">4</option>
                    <option value="5">5</option>
                     <option value="6">6</option>
                      <option value="7">7</option>
                       <option value="8">8</option>
                        <option value="9">9</option>
                         <option value="10">10</option>
                          <option value="11">11</option>
                           <option value="12">12</option>
           </select>
        <a href="javascript:search();" class="easyui-linkbutton" plain="true" iconCls="icon-search">搜索</a>  

</div>

<table id="datagrid"></table>

<!-- 新增/编辑 -->
<div id="dialog" class="easyui-dialog" style="width:500px;height:200px;padding:20px;" closed="true" buttons="#dlg-buttons">
    <form id="fm" method="post" novalidate action="#"  enctype="application/x-www-form-urlencoded" >
        <input type="hidden" name="id"/>
        <div class="fitem"><label>名称</label><input name="name" class="easyui-validatebox txt_fm_mmp_long" required="true"></div>
        
    </form>
</div>
<div id="dlg-buttons">
    <a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-ok" onclick="post()">提交</a>
    <a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dialog').dialog('close')">取消</a>
</div>

#end
